<?php

/**
 * Base project form.
 * 
 * @package    pronos
 * @subpackage form
 * @author     Your name here 
 * @version    SVN: $Id: BaseForm.class.php 20147 2009-07-13 11:46:57Z FabianLange $
 */
class EditPronosForm extends sfFormSymfony
{
	public function configure()
	{	
		$day = 11; //idate("d");
		$month = 6; //idate("m");
		$hr = 1 + idate("H");
		$min = idate("i");
		$today = date('Y-m-d H:i', mktime($hr,$min,0,$month,$day, 2010));
		
		$matchs = Doctrine::getTable('PronosP1Match')
		  ->createQuery('a')
		  ->where("a.date > '".$today."'")
		  ->limit(10)
		  ->orderby('date')
		  ->execute();
		 
		$this->matchs = $matchs;
		
		foreach($matchs as $i => $match) {
			$this->setWidgets(array(
			'score_1'   => new sfWidgetFormInputText(),
			'score_2'   => new sfWidgetFormInputText(),
		));
		}
	
		/*$this->setWidgets(array(
			'email'   => new sfWidgetFormInputText(),
			'message' => new sfWidgetFormTextarea(),
		));
 
		$this->setValidators(array(
			'email'   => new sfValidatorEmail(),
			'message' => new sfValidatorString(array('max_length' => 255)),
		));*/
	}
}